

package com.hazelcast.map.listener;

import com.hazelcast.map.IMap;
import com.hazelcast.map.MapEvent;
import com.hazelcast.spi.annotation.NamespacesSupported;

/**
 * Invoked after all entries are removed by {@link IMap#clear()}.
 *
 * @since 3.5
 */
@FunctionalInterface
@NamespacesSupported
public interface MapClearedListener extends MapListener {
    /**
     * Invoked when all entries are removed by {@link IMap#clear()}.
     * <p>
     * When a listener is registered as local-only then it will be invoked if and only if
     * the <code>clear()</code> method is called on the same instance where the listener
     * was registered to.
     *
     * @param event the map event invoked when all entries are removed by {@link IMap#clear()}
     */
    void mapCleared(MapEvent event);
}
